{extend name="Layout/edit" /}
{block name="content"}
<!-- form start -->
<form class="form-horizontal" action="{:url('editSave')}" method="post">
    <div class="box-body">
        <div class="form-group">
            <label class="col-sm-2 control-label">位置</label>
            <div class="col-sm-10">
                <input type="text" name="location" class="form-control input-sm" placeholder="如:全网首页,交易类频道首页" value="{$data['location']}" title="如:全网首页,交易类频道首页,资讯类频道首页,功能交互类页面,列表页面,会员登录页面" required="required" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">频道</label>
            <div class="col-sm-10">
                <input type="text" name="channel" class="form-control input-sm" value="{$data.channel}" placeholder="如:首页,会员登录页面,服饰频道首页" title="如:首页,会员登录页面,促销频道首页,服饰频道首页,社区频道首页" required="required" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">名称</label>
            <div class="col-sm-10">
                <input type="text" name="name" class="form-control input-sm" value="{$data.name}" placeholder="如:首页第2轮播焦点图,首页2栏通屏,首页1屏右侧Banner" title="如:首页第2轮播焦点图,首页第3轮播焦点图,首页1栏通屏,首页2栏通屏,首页1屏右侧Banner,左侧Banner,会员登录页1屏Banner" required="required" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">标题</label>
            <div class="col-sm-10">
                <input type="text" name="title" class="form-control input-sm" value="{$data.title}" placeholder="如:首页第2轮播焦点图,服饰频道首页1屏通栏" title="格式:{频道}{名称},如:首页第2轮播焦点图,服饰频道首页1屏通栏" required="required" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">代码</label>
            <div class="col-sm-10">
                <input type="text" name="code" class="form-control input-sm" value="{$data.code}" placeholder="如:SY_JDT_RM1:首页焦点图第1轮播" title="格式:{频道拼音缩写}_{名称拼音缩写}_{广告类型}:{n},如:SY_JDT_RM1:首页焦点图第1轮播,SY_FB1:首页底部1栏通屏,GYWMSY_B1:关于我们频道首页1栏通屏" required="required" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">分组</label>
            <div class="col-sm-10">
                <input type="text" name="group" class="form-control input-sm" value="{$data.group}" placeholder="广告分组 (格式:{位置}{分组名称},服饰频道首页商品类别楼层广告)" title="格式:{位置}{分组名称},服饰频道首页商品类别楼层广告" required="required" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">数量</label>
            <div class="col-sm-10">
                <input type="number" name="count" class="form-control input-sm" value="{$data.count|default=0}" placeholder="内容项目数量" required="required" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">图片规格</label>
            <div class="col-sm-10">
                <div class="btn-group btn-group-justified">
                    <div class="btn-group">
                        <div class="input-group">
                            <span class="input-group-addon">宽度</span>
                            <input type="number" name="image_width" class="form-control input-sm" value="{$data.image_width|default=800}" placeholder="宽度" title="宽度" required="required" />
                            <span class="input-group-addon">像素</span>
                        </div>
                    </div>
                    <div class="btn-group">
                        <div class="input-group">
                            <span class="input-group-addon">高度</span>
                            <input type="number" name="image_height" class="form-control input-sm" value="{$data.image_height|default=600}" placeholder="高度" title="高度" required="required" />
                            <span class="input-group-addon">像素</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">文件格式</label>
            <div class="col-sm-10">
                <input type="text" name="file_type" class="form-control input-sm" value="{$data.file_type}" placeholder="如:jpg,gif,png (文件扩展名以英文逗号隔开)" required="required" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">文件大小</label>
            <div class="col-sm-10">
                <div class="input-group">
                    <input type="number" name="file_size" class="form-control input-sm" value="{$data.file_size|default=50}" placeholder="文件大小规格 (为加快页面显示速度, 建议不要超过50KB)" required="required" />
                    <span class="input-group-addon">KB</span>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">备注信息</label>
            <div class="col-sm-10">
                <input type="text" name="remark" class="form-control input-sm"  placeholder="备注信息" size="79" value="{$data['remark']}" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">状态</label>
            <div class="col-sm-10">
                {xshtml:radio name="status" data='array("1"=>"启用","0"=>"禁用")' value="data['status']|default='1'" /}
            </div>
        </div>
    </div>
    <input type="hidden" name="id" value="{$data['id']}" />
    <!-- /.box-body -->
    <div class="box-footer">
        <button type="button" class="btn btn-default xsui-btn-close-dialog">取消</button>
        <button type="submit" class="btn btn-primary pull-right">保存</button>
    </div>
    <!-- /.box-footer -->
</form>
{/block}